#!/bin/bash

# 检查是否提供了 --model_path 参数
if [ -z "$1" ]; then
  echo "Usage: $0 --model_path=<model_path>"
  exit 1
fi

# 提取 --model_path 参数的值
MODEL_PATH=$(echo "$1" | awk -F'=' '{print $2}')

# 执行 Python 脚本
echo "Model finetune started"
python lora_finetune.py --model_path="$MODEL_PATH"
echo "lora finetune finished"
python lora_merge_weight.py --model_path="$MODEL_PATH"
echo "lora merge weight finished"
echo "Model finetune finished"